package com.wbs.shop.nuby.view.activity

import android.view.View
import com.king.keyboard.KingKeyboard
import com.qlmy.cn.ui.base.BaseActivity
import com.wbs.shop.nuby.databinding.ActivitySimpleCashierBinding

class SimpleCashierActivity : BaseActivity<ActivitySimpleCashierBinding>() {
    override fun initView() {
        loadView {
            val kingKeyboard = KingKeyboard(mThis, true, rlKeyboard)
            kingKeyboard.getKeyboardViewConfig()?.keyDoneText = "收款"
            kingKeyboard.register(etMoney, KingKeyboard.KeyboardType.NUMBER_DECIMAL)
            kingKeyboard.register(etMemberPhone, KingKeyboard.KeyboardType.NUMBER)
//            kingKeyboard.viewFocus(etMoney)
            kingKeyboard.setOnKeyDoneListener(::onKeyDone)
            etMemberPhone.post { etMemberPhone.requestFocus() }
        }
    }

    private fun onKeyDone(editText: View?, primaryCode: Int) {

    }
}